<meta name="baidu-site-verification" content="VjujqnH6nl" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<title>{if empty($seo_title)}{$html_title}{else/}{$seo_title}-{$html_title}{/if}</title>
<meta name="keywords" content="{$seo_keywords}" />
<meta name="description" content="{$seo_description}" />

<link rel="shortcut icon" href="__UPLOAD_PATH__/common/favicon.ico" />
<link href="__SHOP_DEFAULT__/css/base.css" rel="stylesheet" type="text/css">
<link href="__SHOP_DEFAULT__/css/home_header.css" rel="stylesheet" type="text/css">
<link href="__SHOP_RESOURCE__/font/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<!--<link rel="stylesheet" href="__PLUGS_PATH__/layui_2.0/css/layui.css">-->
<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/right-bar.css">
<link rel="stylesheet" href="__SITE_RESOURCE__/js/dialog/dialog.css">

<!--[if IE 7]>
  <link rel="stylesheet" href="__SHOP_RESOURCE__/font/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="__SITE_RESOURCE__/js/html5shiv.js"></script>
      <script src="__SITE_RESOURCE__/js/respond.min.js"></script>
<![endif]-->

<script>
    var CART_AJAX_LOAD = '{:url("shop/Cart/ajax_load")}&callback=';
		var CART_DEL = '{:url("shop/Cart/del")}';
		var CART_ADD = '{:url("shop/Cart/add")}';
		var MEMBER_LOGIN = '{:url("member/Login/index")}?ref_url={:urlencode(FU_current_url())}';
		var VIEWED_INFO = '{:url("shop/Index/viewed_info")}';
		var MEMBER_FAVOR_STORE = '{:url("member/Favoritestore/favoritestore")}';
		var MEMBER_FAVOR_GOODS = '{:url("member/Favoritegoods/favoritegoods")}';
		var SHOP_LOGIN = '{:url("shop/index/login")}';
		var MEMBER_CON_QQ = '{:url("member/ConnectQq/index")}';
		var MEMBER_CON_SINA = '{:url("member/Connectsina/index")}';
		var MEMBER_CART_INDEX = '{:url("member/Card/index")}';
		var MEMBER_SNS_INDEX = '{:url("member/Snshome/index")}';
		var MEMBER_CART_MINFO = '{:url("member/Card/mcard_info")}';
		var MEMBER_MESS_SEN = '{:url("member/Message/sendmsg")}';
		var MEMBER_SNS_ADDFOLLOW = '{:url("member/Snsfriend/addfollow")}';
		var JSON_AREA = '{:url("shop/Index/json_area_show")}';
		
		
		
    var COOKIE_PRE = '<?php echo COOKIE_PRE;?>';
    var _CHARSET = 'utf-8';
    var LOGIN_SITE_URL = '<?php echo LOGIN_SITE_URL;?>';
    var MEMBER_SITE_URL = '<?php echo MEMBER_SITE_URL;?>';
    var SITEURL = '__PUBLIC__';
    var SHOP_SITE_URL = '__SHOP_SITE_URL__';
    var RESOURCE_SITE_URL = '__SITE_RESOURCE__';
    var SHOP_TEMPLATES_URL = '__SHOP_DEFAULT__';
</script>

<script src="__SITE_RESOURCE__/js/jquery.js"></script>
<script src="__SITE_RESOURCE__/js/common.js"></script>
<script src="__SITE_RESOURCE__/js/jquery-ui/jquery.ui.js"></script>
<script src="__SITE_RESOURCE__/js/jquery.validation.min.js"></script>
<script src="__SITE_RESOURCE__/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>

<!--<script src="__PLUGS_PATH__/layui_2.0/layui.js"></script>-->


<script type="text/javascript">
var PRICE_FORMAT = '￥%s';
$(function(){
	//首页左侧分类菜单
	$(".category ul.menu").find("li").each(
		function() {
			$(this).hover(
				function() {
				    var cat_id = $(this).attr("cat_id");
					var menu = $(this).find("div[cat_menu_id='"+cat_id+"']");
					menu.show();
					$(this).addClass("hover");					
					var menu_height = menu.height();
					if (menu_height < 60) menu.height(80);
					menu_height = menu.height();
					var li_top = $(this).position().top;
					$(menu).css("top",-li_top + 37);
				},
				function() {
					$(this).removeClass("hover");
				    var cat_id = $(this).attr("cat_id");
					$(this).find("div[cat_menu_id='"+cat_id+"']").hide();
				}
			);
		}
	);
	$(".head-user-menu dl").hover(function() {
		$(this).addClass("hover");
	},
	function() {
		$(this).removeClass("hover");
	});
	// 运行加载购物车
	$('.head-user-menu .my-cart').mouseover(function(){
		load_cart_information();
		$(this).unbind('mouseover');
	});
    {if sysconf('fullindexer.open')}
   
		// input ajax tips
	$('#keyword').focus(function(){
		if ($(this).val() == $(this).attr('title')) {
			$(this).val('').removeClass('tips');
		}
	}).blur(function(){
		if ($(this).val() == '' || $(this).val() == $(this).attr('title')) {
			$(this).addClass('tips').val($(this).attr('title'));
		}
	}).blur().autocomplete({
        source: function (request, response) {
            $.getJSON('{:url("home/Goods/auto_complete")}', request, function (data, status, xhr) {
                $('#top_search_box > ul').unwrap();
                response(data);
                if (status == 'success') {
                 $('body > ul:last').wrap("<div id='top_search_box'></div>").css({'zIndex':'1000','width':'362px'});
                }
            });
       },
		select: function(ev,ui) {
			$('#keyword').val(ui.item.label);
			$('#top_search_form').submit();
		}
	});
	
	{/if}

	$('#button').click(function(){
	    if ($('#keyword').val() == '') {
		    if ($('#keyword').attr('data-value') == '') {
			    return false
			} else {
				window.location.href="{:url('home/Goods/goods_list')}?keyword="+$('#keyword').attr('data-value');
			    return false;
			}
	    }
	});
	
	//关键词搜索
	$(".head-search-bar").hover(null,
	function() {
		$('#search-tip').hide();
	});
	// input ajax tips
	$('#keyword').focus(function(){
		if($('#top_search_form').attr('act')=='search') {
			$('#search-tip').show();
			$('#search-his-list').html('<?php echo $his_search_list_hc;?>');
			$('#top_search_form').attr('action','{:url("shop/Search/index")}');
		} else {
			$('#search-tip').show();
			$('#search-his-list').html('<?php echo $his_search_list_store;?>');
			$('#top_search_form').attr('action','{:url("shop/Storelist/index")}');
		}
		}).autocomplete({
		//minLength:0,
        source: function (request, response) {
            $.getJSON('{:url("home/Goods/auto_complete")}', request, function (data, status, xhr) {
                $('#top_search_box > ul').unwrap();
                response(data);
                if (status == 'success') {
                    $('#search-tip').hide();
                    $(".head-search-bar").unbind('mouseover');
                    $('body > ul:last').wrap("<div id='top_search_box'></div>").css({'zIndex':'1000','width':'362px'});
                }
            });
       },
		select: function(ev,ui) {
			$('#keyword').val(ui.item.label);
			$('#top_search_form').submit();
		}
	});
	$('#search-his-del').on('click',function(){
		$.cookie('his_sh',null,{path:'/'});
		$('#search-his-list').empty();
	});
});
</script>


